package com.ruoyi.domain.purchase;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

// 添加这行导入语句
import com.ruoyi.domain.purchase.MesPurchaseReceiptItem;

/**
 * 采购入库主表对象 mes_purchase_receipt
 *
 * @author ruoyi
 * @date 2024-01-01
 */
@Data
public class MesPurchaseReceipt extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 入库单ID */
    private Long receiptId;

    /** 入库单号 */
    @Excel(name = "入库单号")
    private String receiptCode;

    /** 供应商ID */
    @Excel(name = "供应商ID")
    private Long supplierId;

    /** 供应商编码 */
    @Excel(name = "供应商编码")
    private String supplierCode;

    /** 供应商名称 */
    @Excel(name = "供应商名称")
    private String supplierName;

    /** 仓库ID */
    @Excel(name = "仓库ID")
    private Long warehouseId;

    /** 仓库编码 */
    @Excel(name = "仓库编码")
    private String warehouseCode;

    /** 仓库名称 */
    @Excel(name = "仓库名称")
    private String warehouseName;

    /** 入库日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "入库日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date receiptDate;

    /** 入库总金额 */
    @Excel(name = "入库总金额")
    private BigDecimal totalAmount;

    /** 入库总数量 */
    @Excel(name = "入库总数量")
    private BigDecimal totalQuantity;

    /** 入库类型（NORMAL正常入库 RETURN退货入库 TRANSFER调拨入库） */
    @Excel(name = "入库类型", readConverterExp = "NORMAL=正常入库,RETURN=退货入库,TRANSFER=调拨入库")
    private String receiptType;

    /** 状态（PENDING待质检 INSPECTION_PASSED质检通过 INSPECTION_FAILED质检不通过 RECEIVED已入库 CANCELLED已取消） */
    @Excel(name = "状态", readConverterExp = "PENDING=待质检,INSPECTION_PASSED=质检通过,INSPECTION_FAILED=质检不通过,RECEIVED=已入库,CANCELLED=已取消")
    private String status;
    
    /** 质检单ID */
    @Excel(name = "质检单ID")
    private Long inspectionId;
    
    /** 质检结果 */
    @Excel(name = "质检结果")
    private String inspectionResult;

    /** 操作人员ID */
    @Excel(name = "操作人员ID")
    private Long operatorId;

    /** 操作人员姓名 */
    @Excel(name = "操作人员姓名")
    private String operatorName;

    /** 审核人员ID */
    @Excel(name = "审核人员ID")
    private Long approveId;

    /** 审核人员姓名 */
    @Excel(name = "审核人员姓名")
    private String approveName;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date approveTime;

    /** 入库明细列表 */
    private List<MesPurchaseReceiptItem> receiptItemList;
}